from scrapy.spiders import Spider


class BlogSpider(Spider):
    name = 'DAYceng'
    start_urls = ['https://www.cnblogs.com/DAYceng/']

    def parse(self, response):
        titles = response.xpath('//h1/span/a/text()').extract()
        for title in titles:
            t = title.strip()
            print(t)